package com.health.listener;

import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class Listener2 {

    @RabbitListener(queuesToDeclare = @Queue("工作队列1"))
    public void show1(String msg){
        System.out.println("Work queues模式1》》 接收到消息："+msg);
    }

    @RabbitListener(queuesToDeclare = @Queue("工作队列1"))
    public void show2(String msg){
        System.out.println("Work queues模式2》》 接收到消息："+msg);
    }

}
